package com.bw.service.impl;

import com.bw.entity.Book;
import com.bw.service.BookService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;

@Service
public class BookServiceImpl implements BookService {

    @Override
    public Integer addBook(Book book) {

        System.out.println("----BookServiceImpl ----正在执行addBook---- ");
        return 1;
    }

    @Override
    public Integer updateBook(Book book) {
        System.out.println("----BookServiceImpl ----正在执行updateBook---- ");
        return 1;
    }

    @Override
    public List<Book> selectBook(Book book) {
        System.out.println("----BookServiceImpl ----正在执行selectBook---- ");

        List<Book> list = Arrays.asList(Book.builder().id(1).name("鹿鼎记").build(), Book.builder().id(2).name("倚天屠龙记").build());
        return list;
    }
}
